<template>
    <div>
        <el-container>
            <el-header>
                <el-form style="margin-top: 10px">
                    <el-form-item label="日期：" style="width: 320px;float: left">
                        <el-date-picker v-model="date" value-format="yyyy-MM-dd" type="date" style="width: 150px"/>
                    </el-form-item>
                    <el-form-item style="float: left">
                        <el-button size="mini" type="primary" style="float: left;margin-top:5px" @click="search">查询
                        </el-button>
                        <el-button size="mini" type="primary" style="float: left;margin-top:5px"
                                   @click="sure">确认
                        </el-button>
                        <el-button size="mini" type="primary" style="float: left;margin-top:5px" @click="delAll">批量处理
                        </el-button>
                    </el-form-item>
                </el-form>
            </el-header>
            <el-main>
                <el-table :border="true" :stripe="true"
                          ref="multipleTable"
                          :data="topData"
                          tooltip-effect="dark"
                          style="width: 100%"
                          @selection-change="handleSelectionChange">
                    <el-table-column
                            type="selection"
                            width="55"
                            align="center">
                    </el-table-column>
                    <el-table-column prop="outPut" label="发电企业" align="center"></el-table-column>
                    <el-table-column prop="startTime" label="开始时间" align="center"></el-table-column>
                    <el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
                    <el-table-column prop="type" label="类型" align="center"></el-table-column>
                    <el-table-column prop="applyadjustEng" label="申请计划调整电量" align="center"
                                     width="150"></el-table-column>
                    <el-table-column prop="applycheckEng" label="申请免考核电量" align="center" width="150"></el-table-column>
                    <el-table-column prop="eleRemark" label="备注（电厂）" align="center"></el-table-column>
                    <el-table-column prop="agreeAjust" label="调度是否同意" align="center"></el-table-column>
                    <el-table-column prop="ajustRemark" label="调度部门备注" align="center"></el-table-column>
                    <el-table-column fixed="right" label="操作" width="100" align="center">
                        <template slot-scope="">
                            <el-button @click.native.prevent="dialogFormVisible = true" type="text" size="small">编辑
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-tabs type="border-card" style="margin-top:20px">
                    <el-tab-pane label="免考核附件信息">
                        <el-table :border=true :stripe="true" style="width: 100%" :data="bottomData">
                            <el-table-column prop="functory" label="发电企业" width="200" align="center"></el-table-column>
                            <el-table-column prop="addMsg" label="附件信息" width="300" align="center"></el-table-column>
                            <el-table-column prop="option" label="操作" align="center" width="300">
                                <template slot-scope="">
                                    <el-button type="text" size="mini">预览</el-button>
                                    <el-button type="text" size="mini">下载</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </el-tab-pane>
                </el-tabs>
            </el-main>
        </el-container>

        <el-dialog title="收货地址" :visible.sync="dialogFormVisible">
            <el-form :model="form">
                <el-form-item label="活动名称" :label-width="formLabelWidth">
                    <el-input v-model="form.name" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="活动区域" :label-width="formLabelWidth">
                    <el-select v-model="form.region" placeholder="请选择活动区域">
                        <el-option label="区域一" value="shanghai"></el-option>
                        <el-option label="区域二" value="beijing"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                date: new Date(),
                dialogFormVisible: false,
                topData: [{
                    outPut: '南湖电厂',
                    startTime: '2016-05-03',
                    endTime: '2019-11-19',
                    type: '安全约束',
                    applyadjustEng: '521',
                    eleRemark: '负荷需求',
                    agreeAjust: '同意',
                    ajustRemark: ''
                }, {
                    outPut: '南湖电厂',
                    startTime: '2016-05-03',
                    endTime: '2019-11-19',
                    type: '安全约束',
                    applyadjustEng: '521',
                    eleRemark: '负荷需求',
                    agreeAjust: '同意',
                    ajustRemark: ''
                }, {
                    outPut: '南湖电厂',
                    startTime: '2016-05-03',
                    endTime: '2019-11-19',
                    type: '安全约束',
                    applyadjustEng: '521',
                    eleRemark: '负荷需求',
                    agreeAjust: '同意',
                    ajustRemark: ''
                }, {
                    outPut: '南湖电厂',
                    startTime: '2016-05-03',
                    endTime: '2019-11-19',
                    type: '安全约束',
                    applyadjustEng: '521',
                    eleRemark: '负荷需求',
                    agreeAjust: '同意',
                    ajustRemark: ''
                }],
                bottomData: [{functory: '', addMsg: 'pdf'}, {functory: '', addMsg: 'pdf'}, {
                    functory: '',
                    addMsg: 'pdf'
                }, {functory: '', addMsg: 'pdf'}],
                multipleSelection: [],
                form: {
                    name: '',
                    region: '',
                    date1: '',
                    date2: '',
                    delivery: false,
                    type: [],
                    resource: '',
                    desc: ''
                },
                formLabelWidth: '120px'
            };
        },
        methods: {
            search() {
            },
            sure() {
            },
            delAll() {
            },
            editRow() {
            },
            handleSelectionChange(val) {
                this.multipleSelection = val;
            }
        }
    };
</script>